import Vue from "vue";
import Vuex from "vuex";
import persistence from "vuex-uniapp-persistence"

import user from './user'
Vue.use(Vuex);
const store = new Vuex.Store({
  state: {
    //安全区域
    safeArea: uni.getWindowInfo().safeArea,
    //胶囊
    capsule: uni.getMenuButtonBoundingClientRect()
  },
  getters: {},
  mutations: {

  },
  modules: {
    user,
  },
  //使用持久化插件
  plugins: [persistence()]
});
export default store;
